import { postRequest, getRequest } from '/@/lib/axios';

export const overviewApi = {
  // 产量数据
  getProdRecord() {
    return postRequest('/eapi/tpdol3/findProdMonthData', null);
  },
  // 质量数据
  getQualityRecord() {
    return postRequest('/eapi/tpdol3/findQuaMonthData', null);
  },
  getYieldRateRecord() {
    return postRequest( '/eapi/tpdol3/findThrData', null );
  },
  // 产量记录
  getProdRecordList() {
    return postRequest( '/eapi/tpdol3/findOutputData', null );
  },

  // --------------------------问题清单 -----------------------
  
  problemAdd(data: any) {
    return postRequest( '/eapi/accident/insert', data );
  },
  problemEdit(data: any) {
    return postRequest( '/eapi/accident/update', data );
  },
  problemDelete(indocno: number) {
    return postRequest( '/eapi/accident/delete?id=' + indocno, null );
  },
  problemList(data: any) {
    return postRequest( '/eapi/accident/page', data );
  },

  // 产量记录
  getProdList(data: any) {
    return postRequest( '/eapi/tpdol3/workBreak', data );
  },
  // 作业率
  getWorkRate() {
    return postRequest( '/eapi/tpdol3/workRate', null );
  },
};